﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(DestoryMe());
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(new Vector3(5f * Time.deltaTime, 0, 0));
    }

    IEnumerator DestoryMe()
    {
        yield return new WaitForSeconds(3f);

        Destroy(gameObject);
    }
}
